package com.BigDate.server.mapper;

import com.BigDate.server.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author stx
 * @since 2021-12-22
 */
@Repository
public interface UserMapper extends BaseMapper<User>
{
    User userLogin(String username,String password);

    int updatePwd(User user);

    IPage<User> findAll(Page<User> page);

    User findById(Integer id);

    int deleteById(Integer id);

    int update(User user);

    int add(User user);

    IPage<User> getUserByPage(Page<User> page, @Param("user") User user);
}
